package main

import (
	payment "RPC/kitex_gen/payment"
	"context"
	"fmt"
)

// PayServiceImpl implements the last service interface defined in the IDL.
type PayServiceImpl struct{}

// Pay implements the PayServiceImpl interface.
func (s *PayServiceImpl) Pay(ctx context.Context, payReq *payment.PayReq) (resp *payment.PayResp, err error) {
	// TODO: Your code here...
	return &payment.PayResp{
		PayRes: fmt.Sprintf("购买%s成功,价格为%d元. ", payReq.Item, payReq.Price),
	}, nil
}
